{{extends file="admin/admin_header.tpl"}}
{{block name="content"}}
<h3>留言管理</h3>
	<form action="{{site_url('document/StoreSinglePage')}}" method="post" enctype="multipart/form-data">
		<div class="form-group">
			<table class="table table-striped table-bordered table-hover">
						<thead>
							<tr>
								<th style="width:33px;">Id</th>
								<th style="width:65px;">姓名</th>
								<th style="width:100px;">时间</th>
								<th style="">留言内容</th>
								<th style="width:110px;">审核状态</th>
								<th style="width:100px;">操作</th>
							</tr>
						</thead>
						<tbody>
							{{foreach $message as $v}}
							<tr>
								<td style="text-align:center;">{{$v.id}}</td>
								<td style="text-align:center;">{{$v.name}}</td>
								<td style="text-align:center;">{{date('Y-m-d',$v.time)}}</td>
								<td>{{$v.content}}</td>
								<td style="text-align:center;">
									<a href="{{site_url("document/MessageStatePass?id={{$v.id}}")}}" class="btn btn-xs {{if $v.state}}btn-success{{else}}btn-default{{/if}}">通过</a>
									<a href="{{site_url("document/MessageStateNotPass?id={{$v.id}}")}}" class="btn btn-xs {{if !$v.state}}btn-warning{{else}}btn-default{{/if}}">未通过</a>
								</td>
								<td style="text-align: center;">
									<a href="{{site_url("document/MessageReplyPage?id={{$v.id}}&pid={{$v.pid}}")}}" class="btn btn-xs btn-primary">回复</a>
									<a href="{{site_url("document/MessageDelete?id={{$v.id}}")}}" class="btn btn-xs btn-danger">删除</a>
								</td>
							</tr>
							{{/foreach}}
						</tbody>
					</table>			
		</div>
	</form>
{{/block}}
